package com.landian.commons.base.extension;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author caojl
 */
public class Maps2 {
	/**
	 * 返回对像身份标识列表
	 * @param beanList
	 */
	public static <T,K extends Identity<T>> Map<T,K> getIdentityMap(List<K> beanList){
		Map<T,K> map = new HashMap<T,K>();

		if(null != beanList && beanList.size() > 0){
			for(K bean : beanList){
				map.put(bean.getIdentity(), bean);
			}
		}
		return map;
	}
}
